home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 004 / weight.arc / WEIGHT.BAS
Encoding:
BASIC Source File  |  1986-07-14  |  3.4 KB  |  81 lines

  1. 10 REM WEIGHT ANALYSIS PROGRAM Version 1.0, written 3/23/86
  2. 20 REM BY SAM Y. ARAI
  3. 30 REM THE DATA IS TAKEN FROM FISHBEIN'S ILLUSTRATED MEDICAL AND HEALTH ENCYCLOPEDIA
  4. 35 REM The data in this program is for people over the age of 25.
  5. 37 REM For girls between 18 and 25, subtract 1 pound for each year
  6. 38 REM under the age of 25.
  7. 40 CLS:KEY OFF
  8. 50 FOR X=1 TO 9:PRINT:NEXT X:PRINT TAB(33);"Weight Analysis"
  9. 60 PRINT TAB(35);"Version 1.0":PRINT TAB(33);"March 23, 1986":PRINT:PRINT TAB(34);"by Sam Y.Arai"
  10. 70 PRINT:PRINT:INPUT "Hit <CR> to continue";A$
  11. 80 CLS:CLEAR
  12. 100 PRINT"ARE YOU MALE OF FEMALE? (Hit M or male, F for female)"
  13. 110 A$=INKEY$:IF A$="" THEN 110
  14. 120 IF A$="m" OR A$="M" THEN A=0:PRINT "Male":GOTO 150
  15. 130 IF A$="f" OR A$="F" THEN A=1:PRINT "Female":GOTO 150
  16. 140 GOTO 110
  17. 150 PRINT:PRINT "How tall are you? (Enter Feet,Inches)"
  18. 160 INPUT F,I
  19. 170 IF F<4 OR F>6 OR A=0 AND F=5 AND I<2 OR A=0 AND F=6 AND I>4 OR A=1 AND F=4 AND I<10 OR A=1 AND F=6 AND I>0 THEN 190
  20. 172 PRINT:PRINT"How many pounds do you weigh?"
  21. 174 INPUT W
  22. 180 GOTO 200
  23. 190 PRINT"I'm sorry, but you are either too short or too tall"
  24. 195 PRINT"for this program's database to analyze your weight.":STOP
  25. 200 PRINT:PRINT"Do you have a Small, Medium, or Large Frame?"
  26. 210 PRINT"(Hit S,M,or L key)"
  27. 220 A$=INKEY$:IF A$="" THEN 220
  28. 230 IF A$="s" OR A$="S" THEN S=0:PRINT"Small":GOTO 270
  29. 240 IF A$="m" OR A$="M" THEN S=1:PRINT"Medium":GOTO 270
  30. 250 IF A$="l" OR A$="L" THEN S=2:PRINT"Large":GOTO 270
  31. 260 GOTO 220
  32. 270 IF A=1 THEN A=45:GOTO 300
  33. 280 A=(F-5)*36+(I-2)*3+S
  34. 290 GOTO 310
  35. 300 A=A+(F-4)*36+(I-10)*3+S
  36. 310 FOR X=1 TO A:READ L,U:NEXT X
  37. 320 READ L,U
  38. 330 IF W=>L AND W<=U THEN Z=0
  39. 340 IF W<L THEN Z=1
  40. 350 IF W>U THEN Z=2
  41. 360 PRINT:IF Z=0 THEN PRINT"Your weight is in the desirable weight category."
  42. 370 IF Z=1 THEN PRINT"You are"L-W"pounds under what is considered the desirable weight range."
  43. 380 IF Z=2 THEN PRINT"You are"W-U"pounds over what is considered the desirable weight range."
  44. 390 PRINT"You should weigh between"L"and"U"pounds."
  45. 400 PRINT:IF Z=0 THEN PRINT"Keep up the good work!"
  46. 410 IF Z=1 THEN PRINT"You should probably eat more and exercise to gain weight."
  47. 420 IF Z=2 THEN PRINT"You should eat less fattening foods and exercise to lose weight."
  48. 430 PRINT:PRINT"Thank you for using this program!"
  49. 440 PRINT"Version 1.1 with more feature to come soon!"
  50. 1000 DATA 112,120,118,129,126,141
  51. 1010 DATA 115,123,121,133,129,144
  52. 1020 DATA 118,126,124,136,132,148
  53. 1030 DATA 121,129,127,139,135,152
  54. 1040 DATA 124,133,130,143,138,156
  55. 1050 DATA 128,137,134,147,142,161
  56. 1060 DATA 132,141,138,152,147,166
  57. 1070 DATA 136,145,142,156,151,170
  58. 1080 DATA 140,150,146,160,155,174
  59. 1090 DATA 144,154,150,165,159,179
  60. 1100 DATA 148,158,154,170,164,184
  61. 1110 DATA 152,162,158,175,168,189
  62. 1120 DATA 156,167,162,180,173,194
  63. 1130 DATA 160,171,167,185,178,199
  64. 1140 DATA 164,175,172,190,182,204
  65. 1150 DATA 92,98,96,107,104,119
  66. 1160 DATA 94,101,98,110,106,122
  67. 1170 DATA 96,104,101,113,109,125
  68. 1180 DATA 99,107,104,116,112,128
  69. 1190 DATA 102,110,107,119,115,131
  70. 1200 DATA 105,113,110,122,118,134
  71. 1210 DATA 108,116,113,126,121,138
  72. 1220 DATA 111,119,116,130,125,142
  73. 1230 DATA 114,123,120,135,129,146
  74. 1240 DATA 118,127,124,139,133,150
  75. 1250 DATA 122,131,128,143,137,154
  76. 1260 DATA 126,135,132,147,141,158
  77. 1270 DATA 130,140,136,151,145,163
  78. 1280 DATA 134,144,140,155,149,168
  79. 1290 DATA 138,148,144,159,153,173
  80. 1300 END
  81.